package com.kyivmohyla.kma2.client.events.operator;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIOrder;

public class OperatorEditOrderEvent extends GwtEvent<OperatorEditOrderEventHandler> {
    public static Type<OperatorEditOrderEventHandler> TYPE = new Type<OperatorEditOrderEventHandler>();
    private final UIOrder selectedOrder;

    public UIOrder getSelectedOrder() {
        return selectedOrder;
    }

    public OperatorEditOrderEvent(UIOrder selectedOrder) {
        this.selectedOrder = selectedOrder;
    }

    public Type<OperatorEditOrderEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(OperatorEditOrderEventHandler handler) {
        handler.onOperatorEditOrderWindow(this);
    }
}
